// 用户模块
export default {
  namespaced: true,
  state () {
    return {
      // 用户信息
      profile: {
        id: '1506636697721020417',
        avatar: '',
        nickname: '',
        account: 'hengzai666',
        mobile: '13768476933',
        token: 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ7XCJpZFwiOlwiMTUwNjYzNjY5NzcyMTAyMDQxN1wiLFwidXNlcm5hbWVcIjpcImhlbmd6YWk2NjZcIn0iLCJpYXQiOjE2NDgwNjA2MjQsImV4cCI6MTY0ODMxOTgyNH0.N96lo-_1EFydLYLVOZUhmF_UTXpunVBSAp9tWtOIOyI'
      },
      // 登录后回跳路径
      redirectUrl: 'http://dishitiangege.gitee.io/hz-goshopping'
    }
  },
  mutations: {
    // 修改用户信息，payload就是用户信息对象
    setUser (state, payload) {
      state.profile = payload
    },
    // 修改回跳地址
    setRedirectUrl (state, url) {
      state.redirectUrl = url
    }
  }
}
